/* 软件配置页面样式 - 列表式设计 */

html {
    font-size: 100px;
}

body {
    margin: 0;
    padding: 0;
    font-family: "Roboto", "PingFang SC", "Microsoft YaHei", sans-serif;
    background: linear-gradient(130deg, var(--theme-gradient-start) 0%, var(--theme-gradient-end) 100%);
    height: 100vh;
    color: var(--theme-text-color);
}

.config-body {
    display: flex;
    flex-direction: column;
    height: 100vh;
}

/* 公共头部样式 */
.common-header {
    height: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 0.2rem;
    box-sizing: border-box;
    background-color: transparent;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    position: relative;
}

/* 标签栏样式 */
.tab-header {
    display: flex;
    height: 0.45rem;
    background: var(--theme-card-bg);
    border: 1px solid var(--theme-card-border);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    position: relative;
    z-index: 10;
    margin: 16px;
    border-radius: 12px;
    overflow: hidden;
}

.tab-item {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.18rem;
    color: rgba(255, 255, 255, 0.7);
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    padding: 0 0.2rem;
    background: transparent;
}

.tab-item:hover {
    background: rgba(255, 255, 255, 0.1);
}

.tab-item.active {
    color: var(--theme-text-color);
    background: rgba(255, 255, 255, 0.15);
    font-weight: 500;
}

/* 主内容区域 */
.config-main {
    flex: 1;
    overflow-y: auto;
    padding: 0 16px 16px 16px;
    position: relative;
}

/* 选项卡内容 */
.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* 数据列表样式 */
.data-list {
    margin-top: 0;
    background: var(--theme-card-bg);
    border: 1px solid var(--theme-card-border);
    border-radius: 12px;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    overflow: hidden;
}

.data-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.15rem 0.2rem;
    border-bottom: 1px solid var(--theme-card-border);
    height: 0.2rem;
    transition: background 0.2s ease;
}

.data-item:hover {
    background: rgba(255, 255, 255, 0.05);
}

.data-item:last-child {
    border-bottom: none;
}

.item-label {
    font-size: 0.16rem;
    color: var(--theme-text-color);
    padding-right: 0.1rem;
}

.item-value {
    display: flex;
    align-items: center;
}

.value-text {
    font-size: 0.16rem;
    font-weight: 500;
    color: var(--theme-text-color);
}

.value-unit {
    font-size: 0.16rem;
    color: var(--theme-text-color);
    opacity: 0.8;
    margin-left: 0.03rem;
}

/* Toast提示样式 */
/* .toast-container {
    position: fixed;
    top: 0.7rem;
    left: 0;
    right: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    z-index: 9999;
} */

.toast {
    padding: 0.12rem 0.25rem;
    border-radius: 8px;
    background-color: rgba(33, 33, 33, 0.85);
    color: white;
    margin-bottom: 0.1rem;
    font-size: 0.15rem;
    max-width: 80%;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    animation: toast-in 0.3s ease forwards;
    display: flex;
    align-items: center;
}

@keyframes toast-in {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.toast.success {
    background-color: rgba(76, 175, 80, 0.9);
    border-left: 4px solid #2e7d32;
}

.toast.info {
    background-color: rgba(33, 150, 243, 0.9);
    border-left: 4px solid #1565c0;
}

.toast.warning {
    background-color: rgba(255, 152, 0, 0.9);
    border-left: 4px solid #ef6c00;
}

.toast.error {
    background-color: rgba(244, 67, 54, 0.9);
    border-left: 4px solid #c62828;
}

/* 编辑对话框样式 */
.dialog-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    z-index: 1000;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.dialog-overlay.active {
    opacity: 1;
}

.edit-dialog {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -60%);
    width: 80%;
    max-width: 3.5rem;
    background: var(--theme-card-bg);
    border: 1px solid var(--theme-card-border);
    border-radius: 12px;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    z-index: 1001;
    opacity: 0;
    transition: all 0.3s ease;
}

.edit-dialog.active {
    opacity: 1;
    transform: translate(-50%, -50%);
}

.dialog-header {
    padding: 0.18rem 0.2rem;
    border-bottom: 1px solid var(--theme-card-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--theme-text-color);
    font-size: 0.18rem;
    font-weight: 500;
}

.close-btn {
    font-size: 0.22rem;
    color: var(--theme-text-color);
    opacity: 0.7;
    cursor: pointer;
    width: 0.3rem;
    height: 0.3rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.close-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    opacity: 1;
}

.dialog-body {
    padding: 0.25rem 0.2rem;
}

.input-group {
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid var(--theme-card-border);
    border-radius: 8px;
    padding: 0.05rem;
    position: relative;
    overflow: hidden;
    transition: all 0.2s ease;
}

.input-group:focus-within {
    border-color: rgba(255, 255, 255, 0.5);
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.1);
}

.value-input {
    flex: 1;
    border: none;
    background: transparent;
    color: var(--theme-text-color);
    font-size: 0.2rem;
    padding: 0.12rem 0.15rem;
    width: 100%;
    outline: none;
    font-weight: 500;
    transition: all 0.2s ease;
}

.value-input::-webkit-inner-spin-button, 
.value-input::-webkit-outer-spin-button { 
    -webkit-appearance: none;
    margin: 0;
}

.value-input.error {
    animation: shake 0.5s cubic-bezier(0.36, 0.07, 0.19, 0.97) both;
    transform: translate3d(0, 0, 0);
}

@keyframes shake {
    10%, 90% {
        transform: translate3d(-1px, 0, 0);
    }
    20%, 80% {
        transform: translate3d(2px, 0, 0);
    }
    30%, 50%, 70% {
        transform: translate3d(-3px, 0, 0);
    }
    40%, 60% {
        transform: translate3d(3px, 0, 0);
    }
}

.input-unit {
    padding: 0 0.15rem;
    color: var(--theme-text-color);
    font-size: 0.18rem;
    opacity: 0.8;
}

.dialog-footer {
    display: flex;
    justify-content: flex-end;
    padding: 0.15rem 0.2rem 0.2rem;
    gap: 0.12rem;
}

.dialog-footer button {
    padding: 0.1rem 0.25rem;
    border-radius: 6px;
    font-size: 0.16rem;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
    font-weight: 500;
}

.cancel-btn {
    background: rgba(255, 255, 255, 0.1);
    color: var(--theme-text-color);
}

.cancel-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

.save-btn {
    background: rgba(255, 255, 255, 0.1);
    color: var(--theme-text-color);
}

.save-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* 响应式调整 */
@media screen and (max-width: 768px) {
    html {
        font-size: 625%;
    }
}

/* 确保在大屏上字体大小合适 */
@media screen and (min-width: 1200px) {
    html {
        font-size: 100px;
    }
}